



extern char my_host_byte_order;
extern char my_host_osbits;


extern char    request_sour_host[];
extern char    request_sour_process_name[];
extern unsigned int    request_process_pri_id;

extern int     current_yc_sample_num;//98.10.14
extern int     current_dd_sample_num;//98.10.14

extern int	run_tag;
extern time_t	last_sample_time;


extern int	real_yc_sample_table_num;
extern int	hist_yc_sample_table_num;
extern int	hist_dd_sample_table_num;
extern int	yc_current_total_fields_num;
extern int	dd_current_total_fields_num;
extern class 	system_net_info  history_query;
extern class   duplicat_info sample_dup_info;

extern int	table_step_num;
extern int	field_step_num;
extern short	current_graph_no;
extern int	current_qtable_num;
extern int	current_fquery_num;
extern int	current_yx_change_count;
extern int	current_yx_val_count;  
extern struct table_query_info	*tquery_info;
extern struct query_field_info *fquery_info;
extern int    DeBugMode;


extern struct	one_sybase_info	yc_rsam_table_info[];
extern struct	one_sybase_info	yc_hsam_table_info[];
//extern struct	one_sybase_info	yx_rsam_table_info[];
extern struct	one_sybase_info	dd_hsam_table_info[];
extern struct	yc_sample_field_info	*yc_sam_field_info;
extern struct	dd_sample_field_info	*dd_sam_field_info;
extern struct yx_change_oper_info *yx_change_info; 
extern struct yx_change_oper_info *yx_val_info;  

extern time_t recall_time_point;


extern int read_yc_sample_define_table();
extern int read_dd_sample_define_table();
extern int init_sybase(class system_net_info &sys_info);
//extern int execute_yx_sample(time_t cur_t);
//extern int execute_yc_sample(time_t cur_t);
extern int execute_sql_sentence(char *sql_sentence);
extern int query_one_yc_hist_table(int no);
extern int query_one_dd_hist_table(int no);
extern int 	execute_yc_sql_sentence_and_fill_data(
	int no,
	struct select_field_map se_field_map,
	char *sql_sentence);
extern int 	execute_dd_sql_sentence_and_fill_data(
	int no,
	struct select_field_map se_field_map,
	char *sql_sentence);
extern int get_host_time(int dtdays,int dttime,time_t &timer);
//extern int get_receive_type_and_byte_order(char &,char&);
extern int query_one_yx_hist_table(int no);
extern int insert_one_query_time(
	struct select_field_map &se_field_map,
	time_t occur_time,
	short ms);
extern int insert_one_query_field(
	struct select_field_map &se_field_map,
	struct val_and_status v_and_s);
extern int get_time_str(time_t tmp_time1,char *time_str);
extern int get_yx_speacial_val(char *sql_sentence,int table_type, int max_results=-1);
extern int 	execute_yx_sql_sentence_and_fill_data(
	int no,
	struct select_field_map se_field_map,
	char *sql_sentence);
extern int execute_sql_sentence(char *sql_sentence);


